Path: blob/master/Part 4 - Clustering/K-Means Clustering/[R] K-Means Clustering.ipynb
1009 views
Kernel: R
K-Means Clustering
Data preprocessing
In [1]:
Using the elbow method to find the optimal number of clusters
In [2]:
Out[2]:
From the Elbow method we can see that the optimal cluster number is 5 for the given dataset
Applying K-Means to the Mall dataset
In [3]:
Visualising the clusters
In [4]:
Out[4]:
The target customers should be the one with High Earning and High Spend. Here the datapoints inside cluster 1 are the customers with High Earning and High Spend